package com.hw.one.collect.spadata.dao;

import com.hw.one.collect.dust.po.RaiseDust;
import com.hw.one.collect.spadata.po.SpaPo;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/8/4.
 */
@Repository(value = "spaDataDao")
public class SpaDataDao {

    @Resource
    private MongoTemplate mongoTemplateStandardSiteData;

    private static String tableName = "T_DATA_SPA_HOUR";


    public void saveSpaData(SpaPo spaPo) {
        mongoTemplateStandardSiteData.insert(spaPo, tableName);
    }


    public void saveSpaDataList(List<SpaPo> spaPo) {
        if (spaPo.size() > 0) {
            mongoTemplateStandardSiteData.insert(spaPo, tableName);
        }
    }


}
